package com.bldby.baselibrary.app.util;

import android.support.annotation.DrawableRes;
import android.view.LayoutInflater;
import android.view.View;

import com.bldby.baselibrary.app.GlobalUtil;
import com.bldby.baselibrary.databinding.ViewCommonNodataOrderBinding;

public class NoDataUtil {


    private ViewCommonNodataOrderBinding orderBinding;

    public NoDataUtil(LayoutInflater layoutInflater) {
        orderBinding = ViewCommonNodataOrderBinding.inflate(layoutInflater);
        orderBinding.setViewModel(this);
    }

    public void setTitle(String s) {
        orderBinding.title.setText(s);
    }

    public void setImgage(@DrawableRes int color) {
        orderBinding.imgEmpty.setImageDrawable(GlobalUtil.getApplication().getDrawable(color));
    }

    public View getRoot() {
        return orderBinding.getRoot();
    }
}
